package ru.study.thinkin.chapter7;

class Plate{
	Plate(int i) {
		System.out.println("Конструктор Plate");
	}
}
class DinnerPlate extends Plate {

	DinnerPlate(int i) {
		super(i);
		System.out.println("Конструктор DinnerPlate");
	}	
}
class Utensil {
	Utensil(int i) {
		System.out.println("Конструктор Utensil");
	}
}
class Spoon extends Utensil {
	public Spoon(int i) {
		super(i);
		System.out.println("Конструктор Spoon");
	}	
}
class Fork extends Utensil {

	public Fork(int i) {
		super(i);
		System.out.println("Конструктор Fork");	
	}
	
}
class Knife extends Utensil {

	public Knife(int i) {
		super(i);
		System.out.println("Конструктор knife");
	}	
}
class Custom {
	Custom(int i) {
		System.out.println("Конструктор Custom");
	}
}

public class PlaceSetting extends Custom {
	private Spoon sp;
	private Fork frk;
	private Knife kn;
	private DinnerPlate pl;
	

	public PlaceSetting(int i) {
		super(i+1);
		sp = new Spoon(i+2);
		frk = new Fork(i+3);
		kn = new Knife(i+4);
		pl = new DinnerPlate(i+5);
		System.out.println("Конструктор PlaceSettings");		
	}

	public static void main(String[] args) {
		PlaceSetting x = new PlaceSetting(9);
	}

}
